#include <iostream>

using std::cout;
using std::endl;

class RentHouse
{
public:
    virtual void Rent()=0;
};
class Host:public RentHouse
{
public:
    void Rent()
    {
        cout<<"把房子租出去"<<endl;
    }
};
class Sales:public RentHouse
{
public:
    void Rent()
    {
        cout<<"看房子"<<endl;
        host.Rent();
        cout<<"后续情况联系中介"<<endl;
    }
private:
    Host host;
};
int main()
{
    Sales sales;
    sales.Rent();
    return 0;
}